package models

import "time"

type Article struct {
	Id        int       `json:"id"`
	UserId    int       `json:"user_id"`
	Title     string    `json:"title"`
	Text      string    `json:"text"`
	Deleted   int       `json:"deleted"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Count     int       `json:"count"`
}

func (Article) TableName() string {
	return "article"
}

type Article_Good struct {
	Id        int       `json:"id"`
	UserId    int       `json:"user_id"`
	ArticleId int       `json:"article_id"`
	CreatedAt time.Time `json:"created_at"`
}

func (Article_Good) TableName() string {
	return "article_good"
}

type Article_History struct {
	Id        int       `json:"id"`
	UserId    int       `json:"user_id"`
	ArticleId int       `json:"article_id"`
	CreatedAt time.Time `json:"created_at"`
}

func (Article_History) TableName() string {
	return "article_history"
}

type Article_Review struct {
	Id        int       `json:"id"`
	UserId    int       `json:"user_id"`
	ArticleId int       `json:"article_id"`
	FatherId  int       `json:"father_id"`
	Context   string    `json:"context"`
	Deleted   int       `json:"deleted"`
	CreatedAt time.Time `json:"created_at"`
}

func (Article_Review) TableName() string {
	return "article_review"
}

type Review_Good struct {
	Id        int       `json:"id"`
	UserId    int       `json:"user_id"`
	ReviewId  int       `json:"review_id"`
	CreatedAt time.Time `json:"created_at"`
}

func (Review_Good) TableName() string {
	return "review_good"
}
